Coding method, particularly a numeric coding method

ABSTRACT

An apparatus and method for encoding an input string A into an output string B, whose items a n  and b n  belong to an alphabet S of M symbols s m , the method being characterised by providing an ordered arrangement of the M symbols s m  of the alphabet S, by performing a scanning operation on the items a n  of the input string A and in that, for each of the items a k , where k ε{0, 1, . . . , N−1}, it includes arranging in decreasing order in an ordered arrangement vector O (whose items o j  include the indexes i of items ƒ i ) the M items ƒ i  of an occurrence vector F of the symbols s m  of the alphabet S in at least a portion W k ⊂A of T k  items, establishing a permutation vector P consisting of M items p t , whose items are such as to fulfil the following relationship p o     j   =j and assigning to item b k  of the output string B the symbol b k =S E ( h     Pt=w   ) where w is the w-th index h w  of the ordered succession H such as to fulfil the relationship a k =S h     w    and the enciphering function E(m) is an invertible function whose dominion and co-dominion are coinciding.

RELATED APPLICATIONS

[0001] This application is a United States National Phase applicationbased on PCT/IT02/00314 which was filed on May 22, 2002 entitled “ACoding Method, Particularly a Numeric Coding Method” the subject matterof which is hereby incorporated by reference in its entirety. Inaddition, PCT/IT02/00314 was based on Italian Patent Application No.RM2001A000304 filed on Jun. 1, 2001, the entirety of which is alsoincorporated by reference.

FIELD OF THE INVENTION

[0002] This invention broadly relates to an encoding method and to thecorresponding decoding method.

[0003] More particularly, this invention relates a encoding method andto a corresponding decoding method that, when preferably applied tobinary strings, allow to unbalance or to balance, respectively, theoccurrence distributions of “1” and “0” in the coded string with respectto the distributions of the starting strings. The methods according tothis invention appear to be simple and unexpensive to be exploited,entail a low processing burden and, consequently, are advantageouslyapplicable to digital compression methods, in order to increase thecompression ratios and can be exploited as cryptographic methods.

[0004] This invention further relates to the instruments to perform themethod as well as to the apparatuses to execute the method.

[0005] It is known that one of the main problem in computer technologyis related to the ever increasing amount of data items needed forprocessing. This entails a large expenditure of the computer memoryresources as well as an extended engagement of the telecommunicationsnetworks during the information transmission, which, in turn, entails ahigher transmission error probability.

[0006] Various approaches have been developed to solve such problems byproviding for encoding the data, in binary representation, according tosuitable methods aimed at reducing the expenditure extent of the memoryresources.

[0007] Among these compression methods, the arithmetic compressionmethods are in principle very effective because they furnish acompression value which is very close to the theoretical limit definedby the entropic computation method of Shannon. Such methods have acomputation complexity proportionally increasing with the balance of thebinary string to be compressed, namely the complexity increases withincreasing balance of the “1” and “0” occurrence distribution in thestring to be compressed. Furthermore, the more the string to becompressed is balanced, the less efficient the compression method turnsout to be, thereby reaching low ratio values. The computationalcomplexity noticeably limits the application of the arithmeticcompression methods, because it entails a noticeable expenditure of theresources in the computer performing the compression as well as longprocessing times and a poor efficiency in balanced strings.

[0008] A further problem faced by the inventions in the development ofthis invention is related to cryptography.

[0009] The presently existing cryptographic systems provide for use of akey for encoding and/or decoding data. The most simple cryptographicsystems are all based upon use of a “symmetric key” method, in which thesame key is utilised for the whole encoding/decoding process. Other morepowerful and safer systems are based upon use of an “asymmetric key”method, in which the encoding key is different from the decoding key.

[0010] The weakness point of these systems is the information exchangeneeded for encoding and decoding the data. In fact, when a message is tobe delivered, it is to be encoded and transmitted and the utilised keyis also to be communicated to the addressee in order to enable theaddressee to correctly decode the received message.

[0011] A drawback of these systems, both the ones based upon use of asymmetric key and the ones based upon use of an asymmetric key, isrelated to the fact that the utilised key is to be communicated.

[0012] In fact, should an intruder succeed in intercepting the concernedkey, upon getting the document in his/her hands he/she would have nodifficulty in decoding the contents.

[0013] Furthermore, even if the cryptographic key is not known, it isalways possible to decode the message by following a trial and errorprocedure, also known as “Reverse Engineering”. In fact, almost all filetypologies include an initial portion, designated as “header”, having anextension of a few bytes which unambiguously identifies them (forinstance, all acoustic files with extension “wav” start with an ASCIIvalue “RIFF4”). This means that if an undefined series of attempts todecode the message are carried out by varying the key at each attempt,it is possible to identify the utilised cryptographic key by recognitionof a header of an already known file typology. This appears to be easierwhen also the file type to be decoded and consequently the header to beidentified are known. Obviously, upon identifying the key, the intruderis enabled to decode any information encoded by that key.

SUMMARY OF THE INVENTION

[0014] It is an object of this invention, therefore, to provide a methodfor encoding strings, particularly for numerically encoding binarystrings, which allows in simple, rapid and unexpensively implementableway to unbalance the occurrence distribution of “1” and “0” of theencoded string.

[0015] It is also an object of this invention to provide a decodingmethod, in particular a numeric decoding method, which enables tobalance the occurrence distribution of “1” and “0” of a decoded binarystring and which correspondingly enables to decode a binary stringencoded by means of the numeric encoding method.

[0016] In view of the correspondence between such encoding and decodingmethods, it is apparent that, according to the application type, theirroles can be inverted, so that a binary string can be preliminarilyprocessed by the decoding method and the resulting string can besubsequently processed by the encoding method, in order to recover thestarting string.

[0017] It is a further object of this invention to provide the aboveencoding and decoding methods, particularly numeric encoding anddecoding methods, such that no information item is lost in processingthe strings, the methods turning out to be therefore lossless.

[0018] It is an other object of this invention to provide a methodadapted to perform, on a binary string corresponding to a document, aninformation mixing action in order to make the contents of the documentitself useless to any Reverse Engineering purpose of the encodeddocument.

[0019] Also an object of this invention is to furnish the above encodingand decoding methods such that they are iteratable.

[0020] A further object of this invention is to provide instrumentsneeded to perform the methods and the apparatuses performing the methodsthemselves.

[0021] It is specific subject matter of this invention to provide amethod for encoding an input string A into an output string B, both theinput string A and the output string B comprising N items, respectively,a_(n) and b_(n), where n=0, 1, . . . , N−1, with items a_(n) and b_(n)belonging to an alphabet S of M symbols s_(m), where m=0, 1, . . . ,M−1, the method being characterised in that it includes the followingpreliminary step:

[0022] A. providing an ordered arrangement of the M symbols s_(m) of thealphabet S as represented by a corresponding ordered successionH={h_(l), where l=1, . . . , M−1} of the indexes m, such that

h_(l)ε{0, 1, . . . M−1}

h_(q)≠h_(r) for q≠r;

[0023] in that a scanning operation is carried out on items a_(n) of theinput string A and in that, for each of the items a_(k), where k ε{0, 1,. . . , N−1}, it includes the following steps:

[0024] B. arranging in decreasing order the M items ƒ_(i), where i=0, 1,. . . , M−1, of an occurrence vector F of the symbols s_(m) of thealphabet S in at least a portion W_(k)⊂A of T_(k) items a_(n) of theinput string A, where T_(k)≧0, each item ƒ_(i) being equal to the numberof occurrences in portion W_(k) of the corresponding symbol s_(h) _(i) ,in respect of which the following relationship is fulfilled:${{\sum\limits_{i = 0}^{M - 1}f_{i}} = T_{k}},$

[0025] the items ƒ_(i) of the occurrence vector F (each of which, inother words, is one-to-one correspondence to the symbol s_(m) of thealphabet S in respect of which h_(i)=m) being arranged in an arrangementvector O comprising M items o_(j), where j=0, 1, . . . , M−1, whoseitems o_(j) include the indexes i of items ƒ_(i) of vector F arranged indecreasing order, by employing, when two items ƒ_(i) are equal, theordered arrangement of the symbols s_(m) of the alphabet S, asrepresented by the corresponding ordered arrangement H, such that

ƒ_(o) _(x) ≧ƒ_(o) _(y) , ∀y>x

[0026] and

for ƒ_(o) _(z) =ƒ_(o) _(z+1) , o _(z) =u<v=o _(z+1),

[0027] where

[0028] H={h₀, . . . , h_(u), . . . , h_(v), . . . , h_(M−1)}

[0029] C. establishing a permutation vector P consisting of M itemsp_(t), where t=0, 1, . . . , M−1, whose items are such as to fulfil thefollowing relationship

p _(o) _(j) =j for j=0, 1, . . . , M−1

[0030] and

[0031] D. assigning to item b_(k) of the output string B the symbol

b _(k) =S _(E)(_(h) _(pt=w) )

[0032] where w is the w-th index h_(w) of the ordered succession H suchas to fulfill the relationship

a_(k)=s_(h) _(w)

[0033] and the enciphering function E(m) is an invertible function whosedominion and co-dominion are coinciding and are equal to the assembly{0, 1, . . . , M−1}: $\left\{ {\begin{matrix}{g = {{E(m)} \in \left\{ {0,1,\quad \ldots \quad,{M - 1}} \right\}}} \\{m = {{D(g)} = {{E^{- 1}(g)} \in \left\{ {0,1,\quad \ldots \quad,{M - 1}} \right\}}}}\end{matrix}.} \right.$

[0034] According again to this invention, the at least a portion W_(k)of T_(k) items a_(n) of the input string A can be different by at leasttwo items a_(k) ₁ and a_(k) ₂ as scanned in the input string A.

[0035] Still according to this invention, the number T_(k) of itemsa_(n) belonging to the at least a portion W_(k) is different by at leasttwo items a_(k) ₁ and a_(k) ₂ as scanned in the input string A.

[0036] Further according to this invention, the method can also include,prior to the scanning operation, the following step:

[0037] E. zeroing the M items ƒ_(i), where i=1, . . . , M−1, of theoccurrence vector F:

ƒ_(i)=0, for i=0, 1, . . . , M−1.

[0038] Again according to this invention, for each of the items a_(k),with k ε{(0, 1, . . . , N−1} it further includes the following step:

[0039] F. up-dating the occurrence vector F.

[0040] Again according to this invention, the number T_(k) of itemsa_(n) belonging to the at least a portion W_(k) is not higher than aconstant value T for all items a_(k), where k ε{0, 1, . . . , N−1}, asscanned by the input string A:

T _(k) ≦T,

[0041] where

[0042] k=0, 1, . . . , N−1.

[0043] Preferably according to this invention, the at least a portionW_(k) is a sub-string (or a window) of T_(k) consecutive items a_(n) ofthe input string A. More preferably, the last item is the item a_(k−1)preceding the scanned item a_(k):

W _(k) ={a _(k-T) _(k) ,a _(k-T) _(k)+1, . . . , a _(k−1)}.

[0044] In this case, the up-dating operation of the occurrence vector F,subsequently to computing the scanned item b_(k) of the output string B,can be performed by decreasing the item ƒ_(w1) whose index w1 fulfilsthe relationship

a_(k-t) _(k) =s_(h) _(w1) ,

[0045] and by increasing the item ƒ₂ whose index w2 fulfils therelationship

a_(k)=s_(h) _(w2) .

[0046] Further according to this invention, the number T_(k) of itemsa_(n) belonging to the at least a portion W_(k) is constant for allitems a_(k), where k ε{0, 1, . . . , N−1}, as scanned in the inputstring A:

T_(k)=T,

[0047] where

[0048] k=0, 1, . . . , N−1.

[0049] Again according to this invention, for at least one of thescanned items a_(k), the at least a portion W_(k) coincides with theinput string A:

W_(k)=A.

[0050] Preferably according to this invention, the scanning operation ofthe items a_(k) of the input string A is progressive, so that itemsa_(k), where k=0, 1, . . . , N−1, are successively scanned.

[0051] Still according to this invention, the items a_(n) of the inputstring A belong to a sub-assembly S_(A) of the alphabet S, such thatS_(A)⊂S, and the items b_(n) of the output string B belong to asub-assembly S_(B) of the alphabet S, such that S_(B)⊂S, thesub-assembly S_(A) being different from the sub-assembly S_(B):

S_(A)≠S_(B).

[0052] Preferably according to this invention, the enciphering functionE(m) is a function with memory, so that the n-th computed valueg_(n)=E(m) depends on Z previously computed values:

g _(n) =E(m, g _(e) ₁ , g _(e) ₂ , . . . , g _(e) _(Z) ),

[0053] where Z≧1.

[0054] Further according to this invention, the enciphering functionE(m) can be a pseudo-random value generating function.

[0055] Still according to this invention, the enciphering function E(m)is the identity function:

g=E(m)=m.

[0056] Preferably according to this invention, the input string A andthe output string B are binary strings, the symbols s_(m) of thealphabet S being binary symbols comprising L bits, where L≧1.

[0057] Again according to this invention, the indexes h_(l) of theordered succession H have a binary representation.

[0058] Preferably according to this invention, the indexes h_(l) of theordered succession H are equal to the corresponding symbol s_(l) of thealphabet S:

h_(l)=s_(l).

[0059] Further according to this invention, the indexes i of the itemsƒ_(i) of the occurrence vector F as well as the indexes j of the itemso_(j) of the ordering vector O have a binary representation.

[0060] Preferably according to this invention, the indexes i of theitems ƒ_(i) of the occurrence vector F as well as the indexes j of theitems o_(j) of the ordering vector O belong to the alphabet S.

[0061] It is further object-matter of this invention a method fordecoding an input string B into an output string A, both the inputstring B and the output string A comprising N items, respectively, b_(n)and a_(n), where n=0, 1, . . . , N−1, with items b_(n) and a_(n)belonging to an alphabet S of M symbols s_(m), where m=0, 1, . . . ,M−1, the method being characterised in that it includes the followingpreliminary step:

[0062] G. providing an ordered arrangement of the M symbols s_(m) ofalphabet S represented by a corresponding ordered succession H={h_(l),where l=0 1, . . . , M−1} of the indexes m, such that

h_(l)ε{0,1, . . . , M−1}

h_(q)≠h_(r), for q≠r,

[0063] in that a scanning operation of items b_(n) of the input string Bis carried out and in that, for each of the items b_(k), where k ε{0,1,. . . , N−1}, it includes the following steps:

[0064] H. arranging in decreasing order the M items ƒ_(i), where i=0, 1,. . . , M−1, of an occurrence vector F of the symbols s_(m) of thealphabet S in at least a portion W_(k)⊂A of T_(k) previously calculateditems a_(n) of the output string A, where T_(k)≧0, each items ƒ_(i)being equal to the number of occurrences in portion W_(k) of thecorresponding symbol s_(h) _(i) , in respect of which the followingrelationship is fulfilled:${{\sum\limits_{i = 0}^{M - 1}f_{i}} = T_{k}},$

[0065] the items ƒ_(i) of the occurrence vector F being arranged in anordered arrangement vector O comprising M items o_(j), where j=0, 1, . .. , M−1, whose items o_(j) include the indexes i of items ƒ_(i) ofvector F arranged in decreasing order, by employing, when two itemsƒ_(i) are equal, the arrangement of the symbols s_(m) of the alphabet S,as represented by the corresponding ordered arrangement H, such that

ƒ_(o) _(x) ≧ƒ_(o) _(y) , ∀y>x

[0066] and

for ƒ_(o) _(z) =ƒ_(o) _(z+1) , o _(z) =u<v=o _(z+1),

[0067] where

[0068] H={h₀, . . . , h_(u), . . . , h_(v), . . . , h_(M−1)}

[0069] and

[0070] J. assigning to item a_(k) of the output string A the symbol

a _(k) =s _(D)(_(h) _(oj=w) )

[0071] where w is the w-th index h_(w) of the ordered succession H suchas to fulfill the relationship

b_(k)=s_(h) _(w)

[0072] and the deciphering function D(g) is an function whose dominionand co-dominion are coinciding and are equal to the assembly {0, 1, . .. , M−1}: $\left\{ {\begin{matrix}{m = {{D\quad (g)} \in \left\{ {0,1,\quad \ldots \quad,{M - 1}} \right\}}} \\{g = {{E(m)} = {{D^{- 1}(m)} = {\in \left\{ {0,1,\quad \ldots \quad,{M - 1}} \right\}}}}}\end{matrix}.} \right.$

[0073] The decoding method according to this invention can provide thatthe at least a portion W_(k) of T_(k) items a_(n) of the output string Ais different by at least two items b_(k) ₁ and b_(k) ₂ as scanned in theinput string B.

[0074] Still in the method according to this invention, the number T_(k)of items a_(n) belonging to the at least a portion W_(k) can bedifferent by at least two items b_(k) ₁ and b_(k) ₂ as scanned in theinput string B.

[0075] The decoding method according to this invention can furtherinclude, prior to the scanning, the following step:

[0076] K. zeroing the M items ƒi, where i=1, . . . , M−1, of theoccurrence vector F:

ƒi=0, for i=0, 1, . . . , M−1.

[0077] Still according to this invention, for each of the items b_(k),with k ε{0, 1, . . . , N−1}, the decoding method can further include thefollowing step:

[0078] L. up-dating the occurrence vector F.

[0079] Furthermore, in the method according to this invention, thenumber T_(k) of items a_(n) belonging to the at least a portion W_(k)can be no higher than a constant value T for all items b_(k),

[0080] where k ε{b 0, 1, . . . , N−1}, as scanned by the input string B:T_(k)≦T, where k=0, 1, . . . , M−1.

[0081] Preferably, in the method according to this invention, the atleast a portion W_(k) is a sub-string or window of T_(k) consecutiveitems a_(n) of the output string A.

[0082] Still according to this invention, in the decoding method, the atleast a portion W_(k) can be a sub-string of T_(k) consecutive itemsa_(n) of the output string A whose last item is the item a_(k−1) ascalculated for the scanned item b_(k) preceding the scanned item b_(k)of the input string B:

W _(k) ={a _(k-T) _(k) ,a _(k-T) _(k) ₊₁ , . . . , a _(k−1)}.

[0083] Again in the decoding method according to this invention, thenumber T_(k) of items a_(n) belonging to the at least a portion W_(k)can be constant for all items b_(k), where k ε{0, 1, . . . , N−1}, asscanned in the input string B:

T_(k)=T,

[0084] where

[0085] k=0, 1, . . . , N−1.

[0086] Preferably according to this invention, the decoding methodperforms the scanning operation of items b_(n) of the input string B inprogressive mode, so that items b_(k) where k=0, 1, . . . , N−1 aresuccessively scanned.

[0087] Further according to this invention, the decoding method canprovide for the items b_(n) of the input string B to belong to asub-assembly S_(B) of the alphabet S, such that S_(B)⊂S, and the itemsa_(n) of the output string A belong to a sub-assembly S_(A) of thealphabet S, such that S_(A)⊂S, the sub-assembly S_(B) being differentfrom the sub-assembly S_(A):

S_(B)≠S_(A).

[0088] Preferably according to this invention, the deciphering functionD(g) as exploited in the decoding method is a function with memory, sothat the n-th computed value m_(n)=D(g) depends on J previously computedvalues:

m _(n) =D(g, m _(c) ₁ , m _(c) ₂ , . . . , m _(c) _(j) ),

[0089] where J≧1.

[0090] Still according to this invention, the deciphering function D(g)can be the inverse function of a pseudo-random value generatingfunction.

[0091] Again according to this invention, the deciphering function D(g)can be the identity function:

m=D(g)=g.

[0092] Preferably according to this invention, the input string B andthe output string A are binary strings, the symbols s_(m) of thealphabet S being binary symbols comprising L bits, where L≧1.

[0093] Further according to this invention, the decoding method canprovide for the indexes h_(l), of the ordered succession H to have abinary representation and particularly to be equal to the correspondingsymbol s_(l) of the alphabet S:

h_(l)=s_(l).

[0094] Still according to this invention, the decoding method canprovide for the indexes i of the items ƒ_(i) of the occurrence vector Fas well as the indexes j of the items o_(j) of the ordering vector O tohave a binary representation and particularly to belong to the alphabetS.

[0095] Preferably, according to this invention, the input string B tothe decoding method is a string obtained as an output string of theencoding method as hereinabove described.

[0096] More preferably, according to this invention, the decipheringfunction D(g) is the inverse function of the enciphering function E(m)of the encoding method.

[0097] It further subject-matter of this invention a processorcomprising processing means, characterised in that it is adapted toperform the encoding method according to this invention.

[0098] It is further subject-matter of this invention a computer programcharacterised in that it includes code means adapted to perform, whenthey operate on a computer, the encoding method according to thisinvention.

[0099] It is further subject-matter of this invention a memory mediumreadable by a computer having a program stored therein, characterised inthat the program is a computer program as above described.

[0100] It is additionally subject-matter of this invention a processorcomprising processing means, characterised in that it is adapted toperform the decoding method according to this invention.

[0101] It is further subject-matter of this invention a computer programcharacterised in that it includes code means adapted to perform, whenthey operate on a computer, the decoding method according to thisinvention.

[0102] It is additionally subject-matter of this invention a memorymedium readable by a computer having a program stored therein,characterised in that the program is a computer program as abovedescribed.

BRIEF DESCRIPTION OF THE FIGURES

[0103] This invention will be now described by way of illustration andnot by way of limitation according to its preferred embodiments, byparticularly referring to the Figures of the annexed drawings, in which:

[0104]FIG. 1 shows a flow diagram of a preferred embodiment of theencoding method according to this invention;

[0105]FIG. 2 shows an input string A as scanned by the method of FIG. 1;

[0106]FIG. 3 shows the occurrence vector F (FIG. 3a), the orderedarrangement O (FIG. 3b) and the permutation vector P (FIG. 4c)considered in connection with the first item of the input string A fromthe method of FIG. 1;

[0107]FIG. 4 shows the occurrence vector F (FIG. 4a), the orderedarrangement vector O (FIG. 4b) and the permutation vector P (FIG. 4c)considered in connection with the second item of the input string A fromthe method of FIG. 1;

[0108]FIG. 5 shows the occurrence vector F (FIG. 5a), the orderedarrangement vector O (FIG. 5b) and the permutation vector P (FIG. 5c)considered in connection with the third item of the input string A fromthe method of FIG. 1;

[0109]FIG. 6 shows the occurrence vector F (FIG. 6a), the orderedarrangement vector O (FIG. 6b) and the permutation vector P (FIG. 6c)considered in connection with the fourth item of the input string A fromthe method of FIG. 1;

[0110]FIG. 7 shows the occurrence vector F (FIG. 7a), the orderedarrangement vector O (FIG. 7b) and the permutation vector P (FIG. 7c)considered in connection with the fifth item of the input string A fromthe method of FIG. 1;

[0111]FIG. 8 shows the occurrence vector F (FIG. 8a), the orderedarrangement vector O (FIG. 8b) and the permutation vector P (FIG. 8c)considered in connection with the sixth item of the input string A fromthe method of FIG. 1;

[0112]FIG. 9 shows the occurrence vector F (FIG. 9a), the orderedarrangement vector O (FIG. 9b) and the permutation vector P (FIG. 9c)considered in connection with the seventh item of the input string Afrom the method of FIG. 1; and

[0113]FIG. 10 shows the first seven items of the output string Bobtained by the method of FIG. 1.

DETAILED DESCRIPTION OF VARIOUS EMBODIMENTS

[0114] The encoding method according to this invention operates as aconcentration filter, in view of the fact that it is adapted to evidencethe correlations between the items of an input string A .

[0115] And, vice versa, the decoding method according to this inventionis exactly complementary to the encoding method and it operates as adispersion filter.

[0116] In particular, the reconstruction of a starting string A, byapplying the decoding method to the string B, as obtained by means ofthe encoding method, is assured by the following property

p _(o) _(j) =J, for j=0, 1, . . . , M−1

[0117] of the permutation vector P and by the fact that the decipheringfunction D(g) is the inverse function of the enciphering function E(m).

[0118] In similar way, it is apparent that it is possible to reconstructa starting string B, by applying the encoding method to the string A, asobtained by applying the decoding method to the string B .

[0119] In particular, a preferred embodiment of the encoding method andof the decoding method according to this invention will be describedbelow under the assumption that:

[0120] string A (input string for the encoding method and output stringfor the decoding method) and string B (output string for the encodingmethod and input string for the decoding method) are binary strings;

[0121] the symbols s_(m) of the alphabet S are binary symbols comprisingL bits (where L≧1, preferably L>1, and more preferably L>2);

[0122] the indexes h_(l) of the ordered succession H, as shown in binaryrepresentation, are equal to the corresponding symbol s_(l) of thealphabet S:

h_(l)=s_(l); and

[0123] the indexes i of the items ƒ_(i) of the occurrence vector F andindexes j of the items o_(j) of the ordered arrangement vector O belongto the alphabet S.

[0124] In this case, step D of the encoding method assigns to the itemb_(k) of the output string B the following symbol

b_(k)=p_(E)(_(a) _(k))

[0125] that, when the enciphering function E(m) is the identityfunction, becomes

b_(k)=p_(a) _(k) .

[0126] In similar way, step J of the decoding method assigns to the itema_(k) of the putput string A the symbol

a _(k) =D(o _(b) _(k) )

[0127] that, when the deciphering function D(g) is the identityfunction, becomes

a_(k)=o_(b) _(k) .

[0128] By referring to FIG. 1, which shows a flow diagram of a preferredembodiment of the coding method according to this invention, it isassumed that:

[0129] the symbols s_(m) of the alphabet S are couple of bits, or thefollowing four binary symbols having L=2:

S={“00”, “01”, “10”, “11”};

[0130] the ordered arrangement of the symbols s_(m) of the alphabet S iscoinciding with the binary digital value:

“00”, “01”, “10”, “11”:

[0131] portion W_(k) is a window containing, if existing, the T=5consecutive items preceding the scanned item a_(k) of the input stringA; and

[0132] the enciphering function E(m) is the identity function.

[0133] The input binary string A is the one shown in FIG. 2, wherea₀=“11”, and the occurrence vector F is zeroed.

[0134]FIG. 3 shows the occurrence vector F (FIG. 3a), the orderedarrangement vector O (FIG. 3b) and the permutation vector P (FIG. 3c).

[0135] It is apparent that symbol b₀=p_(a) ₀ =“11” is assigned to theitem of the output string B corresponding to a₀.

[0136]FIG. 4 shows the occurrence vector F (FIG. 4a), up-dated by theoccurrence of symbol “11” in window W₁ related to the subsequentlyscanned item a₁=“01” of the input string A, and it also shows the newordered arrangement vector O (FIG. 4b) as well as the new permutationvector P (FIG. 4c).

[0137] Symbol b₁=p_(a) ₁ =“10” is assigned to the item of the outputstring B corresponding to a₁.

[0138]FIG. 5 shows the occurrence vector F (FIG. 5a), up-dated by theoccurrence of symbol “01” in window W₂ related to the subsequentlyscanned item a₂=“10” of the input string A, and it also shows the newordered arrangement vector O (FIG. 5b) as well as the new permutationvector P (FIG. 5c).

[0139] Symbol b₂=p_(a) ₂ =“11” is assigned to the item of the outputstring B corresponding to a₂.

[0140]FIG. 6 shows the occurrence vector F (FIG. 6a), up-dated by theoccurrence of symbol “10” in window W₃ related to the subsequentlyscanned item a₃=“00” of the input string A, and it also shows the newordered arrangement vector O (FIG. 6b) as well as the new permutationvector P (FIG. 6c).

[0141] Symbol b₃=p_(a) ₃ =“11” is assigned to the item of the outputstring B corresponding to a₃.

[0142]FIG. 7 shows the occurrence vector F (FIG. 7a), up-dated by theoccurrence of symbol “00” in window W₄ related to the subsequentlyscanned item a₄=“11” of the input string A, and it also shows the newordered arrangement vector O (FIG. 7b) as well as the new permutationvector P (FIG. 7c). Symbol b₄=P_(a) ₄ =“11” is assigned to the item ofthe output string B corresponding to a₄.

[0143]FIG. 8 shows the occurrence vector F (FIG. 8a), up-dated by thefurther occurrence of symbol “11” in window W₅ related to thesubsequently scanned item a₅=“00” of the input string A, and it alsoshows the new ordered arrangement vector O (FIG. 8b) as well as the newpermutation vector P (FIG. 8c).

[0144] Symbol b₅=p_(a) ₅ =“01” is assigned to the item of the outputstring B corresponding to a₅.

[0145]FIG. 9a shows the occurrence vector F (FIG. 8a), up-dated by thefurther occurrence of symbol “00” in window W₆ and by the occurrenceelimination of symbol “11” belonging to the item a₀ which was includedin window W₅ but was not included in window W₆. Such window is relatedto the subsequently scanned item a₆=“00” of the input string A, inrespect of which FIGS. 9b and 9 c respectively show the new orderedarrangement vector O as well as the new permutation vector P.

[0146] Symbol b₆=p_(a) ₆ =“00” is assigned to the item of the outputstring B corresponding to a₆.

[0147]FIG. 10 shows the output string B as obtained up to b₆.

[0148] The encoding method continues computing the items b_(k) of theoutput string B until the input string A is completely scanned. Inparticular, should the final bits of the input string A be notsufficient to reach the number of bits L for representing the symbolss_(m) of the alphabet S, the method can alternatively copy them at theend of the output string or fill the bits lacking to L with arbitrarybits (for instance a tail of “0”'s) and carry out an encoding operationof the symbol s_(m) as obtained by means of such filling operation.

[0149] It is apparent that the ordered arrangement of the symbols s_(m)of the alphabet S can be arbitrary, rather than coinciding with thebinary numeric value, as shown in FIGS. 2-10.

[0150] The effect generated by utilising an enciphering function E(m)different from the identity function is to introduce a furtherpermutation between the read out items and the encoded ones.

[0151] As above the, it is possible to utilise enciphering functions ofdifferent forms that should

[0152] be invertible, in order to make the input string recoverable, byapplying the decoding method according to the invention to the outputstring, and

[0153] have coincident dominion and co-dominion, in order that thepermutation function be existing for each value of the independentvariable.

[0154] To all application purposes of cryptography, it is advantageousfor the enciphering function E(m) to be a function with memory, bymaking the value calculated at a given step depending on all previousvalues which obviously depend on what has been scanned up to theprevious step.

[0155] Only by way of exemplification and not by way of limitation, afunction adapted to generate pseudo random values (whose statisticalbehaviour is similar to a noise function) could be utilised asenciphering function E(m), the pseudo random values being dependant, inparticular, on one or more initial values or seeds. Such kind offunctions should allow to generate acyclic sequences as long aspossible, in order to assure an high level of introduced noise, such asto make any Reverse Engineering attempt even more complex. Examples ofpseudo random value generating functions can be the linear congruencefunctions (or Lehmer functions).

[0156] It should be immediately understood by those skilled in the artthat both the encoding method and the decoding method according to thisinvention are iteratable a number of times, by construing each time theobtained output string as a new input string.

[0157] The preferred embodiments of this invention have been describedand a number of variations have been suggested hereinbefore, but itshould expressly be understood that those skilled in the art can makeother variations and changes, without so departing from the scopethereof, as defined in the following claims.

1. A method for encoding an input string A into an output string B, boththe input string A and the output string B comprising N items,respectively, a_(n) and b_(n), where n=0, 1, . . . , N−1, with itemsa_(n) and b_(n) belonging to an alphabet S of M symbols s_(m), wherem=0, 1, . . . , M−1, the method comprising the steps of: A. providing anordered arrangement of the M symbols s_(m) of the alphabet S asrepresented by a corresponding ordered succession H={h_(l), where l=1, .. . , M−1} of the indexes m, such that h_(l)ε{0, 1, . . . ,M−1}h_(q)≠h_(r) for q≠r, in that a scanning operation is carried out onitems a_(n) of the input string A and in that, for each of the itemsa_(k), where k ε{0, 1, . . . , N−1}, it includes the following steps: B.arranging in decreasing order the M items ƒ_(i), where i=0, 1, . . . ,M−1, of an occurrence vector F of the symbols s_(m) of the alphabet S inat least a portion W_(k)⊂A of T_(k) items a_(n) of the input string A,where T_(k)≧0, each item ƒ_(i) being equal to the number of occurrencesin portion W_(k) of the corresponding symbol s_(h) _(i) , in respect ofwhich the following relationship is fulfilled:${{\sum\limits_{i = 0}^{M - 1}f_{i}} = T_{k}},$

the items ƒ_(i) of the occurrence vector F being arranged in an orderedarrangement vector O comprising M items o_(j), where j=0, 1, . . . ,M−1, whose items o_(j) include the indexes i of items ƒ_(i) of vector Farranged in decreasing order, by employing, when two items ƒ_(i) areequal, the arrangement of the symbols s_(m) of the alphabet S, asrepresented by the corresponding ordered arrangement H, such that ƒ_(o)_(x) ≧ƒ_(o) _(y) , ∀y>x and for ƒ_(o) _(z) =ƒ_(o) _(z+1) ,o_(z)=u<v=o_(z+1), where H={h₀, . . . , h_(u), . . . , h_(v), . . . ,h_(M−1)} C. establishing a permutation vector P consisting of M itemsp_(t), where t=0, 1, . . . , M−1, whose items are such as to fulfil thefollowing relationship p _(o) _(j) =j for j=0, 1, . . . , M−1 and D.assigning to item b_(k) of the output string B the symbol b _(k) =s_(E)(_(h) _(pt=w) ) where w is the w-th index h_(w) of the orderedsuccession H such as to fulfil the relationship a_(k)=s_(h) _(w) and theenciphering function E(m) is an invertible function whose dominion andco-dominion are coinciding and are equal to the assembly {0, 1, . . . ,M−1}: $\left\{ {\begin{matrix}{g = {{E(m)} \in \left\{ {0,1,\quad \ldots \quad,{M - 1}} \right\}}} \\{m = {{D(g)} = {{E^{- 1}(g)} \in \left\{ {0,1,\quad \ldots \quad,{M - 1}} \right\}}}}\end{matrix}.} \right.$


2. A method according to claim 1, wherein the at least a portion W_(k)of T_(k) items a_(n) of the input string A is different by at least twoitems a_(k) ₁ , and a_(k) ₂ as scanned in the input string A.
 3. Amethod according to claim 2, wherein the number T_(k) of items a_(n)belonging to the at least a portion W_(k) is different by at least twoitems a_(k) ₁ , and a_(k) ₂ as scanned in the input string A.
 4. Amethod according to claim 1 further comprising the step of: E. zeroingthe M items ƒ_(i), where i=1, . . . , M−1, of the occurrence vector F:ƒ_(i)=0, for i=0, 1, . . . , M−1.
 5. A method according to claim 4wherein for each of the items a_(k), with k ε{0, 1, . . . , N−1} itfurther includes the following step: F. up-dating the occurrence vectorF.
 6. A method according to claim 1 wherein the number T_(k) of itemsa_(n) belonging to the at least a portion W_(k) is not higher than aconstant value T for all items a_(k), where k ε{0, 1, . . . , N−1}, asscanned by the input string A: T_(k)≦T, where k=0, 1, . . . , N−1.
 7. Amethod according to claim 6, wherein the at least a portion W_(k) is asub-string of T_(k) consecutive items a_(n) of the input string A.
 8. Amethod according to claim 7, wherein the at least a portion W_(k) is asub-string of T_(k) consecutive items a_(n) of the input string A, whoselast item is the item a_(k−1) preceding the scanned item a_(k):W_(k)={a_(k-T) _(k), a_(k-T) _(k) ₊₁, . . . , a_(k−1)}.
 9. A methodaccording to claim 1 wherein the number T_(k) of items a_(n) belongingto the at least a portion W_(k) is constant for all items a_(k), where kε{0, 1, . . . , N−1}, as scanned in the input string A: T_(k)=T, wherek=0, 1, . . . , N−1.
 10. A method according to claim 1 wherein, for atleast one of the scanned items a_(k), the at least a portion W_(k)coincides with the input string A: W_(k)=A.
 11. A method according toclaim 1 wherein the scanning operation of the items a_(k) of the inputstring A is progressive, so that items a_(k), where k=0, 1, . . . , N−1,are successively scanned.
 12. A method according to claim 1 wherein theitems a_(n) of the input string A belong to a sub-assembly S_(A) of thealphabet S, such that S_(A)⊂S, and the items b_(n) of the output stringB belong to a sub-assembly S_(B) of the alphabet S, such that S_(B)⊂S,the sub-assembly S_(A) being different from the sub-assembly S_(B):S_(A)≠S_(B).
 13. A method according to claim 1 wherein the encipheringfunction E(m) is a function with memory, so that the n-th computed valueg_(n)=E(m) depends on Z previously computed values: g _(n) =E(m, g _(e)₁ , g _(e) ₂ , . . . g _(e) _(z) ), where Z≧1.
 14. A method according toclaim 13 wherein the enciphering function E(m) is a pseudo-random valuegenerating function.
 15. A method according to claim 1 wherein theenciphering function E(m) is the identity function: g=E(m)=m.
 16. Amethod according to claim 1 wherein the input string A and the outputstring B are binary strings, the symbols s_(m) of the alphabet S beingbinary symbols comprising L bits, where L≧1.
 17. A method according toclaim 16 wherein the indexes h_(l) of the ordered succession H have abinary representation.
 18. A method according to claim 17 wherein theindexes h_(l) of the ordered succession H are equal to the correspondingsymbol s_(l) of the alphabet S: h_(l)=S_(l).
 19. A method according toclaim 17 wherein the indexes i of the items ƒ_(i) of the occurrencevector F as well as the indexes j of the items o_(j) of the orderedarrangement vector O have a binary representation.
 20. A methodaccording to claim 19 wherein the indexes i of the items ƒ_(i) of theoccurrence vector F as well as the indexes j of the items o_(j) of theordered arrangement vector O belong to the alphabet S.
 21. A method fordecoding an input string B into an output string A, both the inputstring B and the output string A comprising N items, respectively, b_(n)and a_(n), where n=0, 1, . . . , N−1, with items b_(n) and a_(n)belonging to an alphabet S of M symbols s_(m), where m=0, 1, . . . ,M−1, the method comprising the steps of: A. providing an orderedarrangement of the M symbols s_(m) of alphabet S represented by acorresponding ordered succession H={h_(l), where l=0, 1, . . . , M−1} ofthe indexes m, such that h_(l)ε{0,1, . . . , M−1}h_(q)≠h_(r), for q≠r,in that a scanning operation of items b_(n) of the input string B iscarried out and in that, for each of the items b_(k), where k ε{0,1, . .. , N−1}, it includes the following steps: B. arranging in decreasingorder the M items ƒ_(i), where i=0, 1, . . . , M−1, of an occurrencevector F of the symbols s_(m) of the alphabet S in at least a portionW_(k)⊂A of T_(k) previously calculated items a_(n) of the output stringA, where T_(k)≧0, each item ƒ_(i) being equal to the number ofoccurrences in portion W_(k) of the corresponding symbol s_(h) _(i) , inrespect of which the following relationship is fulfilled:${{\sum\limits_{i = 0}^{M - 1}f_{i}} = T_{k}},$

the items ƒ_(i) of the occurrence vector F being arranged in an orderedarrangement vector O comprising M items o_(j), where j=0, 1, . . . ,M−1, whose items o_(j) include the indexes i of items ƒ_(i) of vector Farranged in decreasing order, by employing, when two items ƒ_(i) areequal, the ordered arrangement of the symbols s_(m) of the alphabet S,as represented by the corresponding ordered arrangement H, such thatƒ_(o) _(x) ≧ƒ_(o) _(y) , ∀y>x and for ƒ_(o) _(z) =ƒ_(o) _(z) +,o_(z)=u<v=o_(z+1), where H={h₀, . . . , h_(u), . . . , h_(v), . . . ,h_(M−1)} and C. assigning to item a_(k) of the output string A thesymbol a _(k) =s _(D)(_(h) _(oj=w) ) where w is the w-th index h_(w) ofthe ordered succession H such as to fulfil the relationship b_(k)=s_(h)_(w) and the deciphering function D(g) is an invertible function whosedominion and co-dominion are coinciding and are equal to the assembly{0, 1, . . . , M−1}: $\left\{ \begin{matrix}{m = {{D\quad (g)} \in \left\{ {0,1,\quad \ldots \quad,{M - 1}} \right\}}} \\{g = {{E(m)} = {{D^{- 1}(m)} = {\in \left\{ {0,1,\quad \ldots \quad,{M - 1}} \right\}}}}}\end{matrix}\quad \right..$


22. A method according to claim 21 wherein the at least a portion W_(k)of T_(k) items a_(n) of the output string A is different by at least twoitems b_(k) ₁ and b_(k) ₂ as scanned in the input string B.
 23. A methodaccording to claim 22 wherein the number T_(k) of items a_(n) belongingto the at least a portion W_(k) is different by at least two items b_(k)₁ and b_(k) ₂ as scanned in the input string B.
 24. A method accordingto claim 21 further comprising the step, prior to scanning, of: D.zeroing the M items ƒ_(i), where i=1, . . . , M−1, of the occurrencevector F: ƒ_(i)=0, for i=0, 1, . . . , M−1.
 25. A method according toclaim 22 wherein for each of the items b_(k), with k ε{0, 1, . . . ,N−1}, further comprising the step of: E. up-dating the occurrence vectorF.
 26. A method according to claim 21 wherein the number T_(k) of itemsa_(n) belonging to the at least a portion W_(k) is not higher than aconstant value T for all items b_(k), where k ε{0, 1, . . . , N−1}, asscanned by the input string B: T_(k)≦T, where k=0, 1, . . . , N−1.
 27. Amethod according to claim 26 wherein the at least a portion W_(k) is asub-string of T_(k) consecutive items a_(n) of the output string A. 28.A method according to claim 27 wherein the at least a portion W_(k) is asub-string of T_(k) consecutive items a_(n) of the output string A whoselast item is the item a_(k−1) as calculated for the scanned item b_(k)preceding the scanned item b_(k) of the input string B: W_(k)={a_(k-T)_(k) , a_(k-T) _(k) ₊₁, . . . , a_(k−1)}.
 29. A method according toclaim 21 wherein the number T_(k) of items a_(n) belonging to the atleast a portion W_(k) is constant for all items b_(k), where k ε{0, 1, .. . , N−1}, as scanned in the input string B: T_(k)=T, where k=0, 1, . .. , N−1.
 30. A method according to claim 21 wherein the scanningoperation of items b_(n) of the input string B is progressive, so thatitems b_(k) where k=0, 1, . . . , N−1 are successively scanned.
 31. Amethod according to claim 21 wherein the items b_(n) of the input stringB belong to a sub-assembly S_(B) of the alphabet S, such that S_(B)⊂S,and the items a_(n) of the output string A belong to a sub-assemblyS_(A) of the alphabet S, such that S_(A)⊂S, the sub-assembly S_(B) beingdifferent from the sub-assembly S_(A): S_(B)≠S_(A).
 32. A methodaccording to claim 21 wherein the deciphering function D(g) is afunction with memory, so that the n-th computed value m_(n)=D(g) dependson J previously computed values: m _(n) =D(g, m _(c) ₁ , m _(c) ₂ , . .. , m _(c) _(j) ), where J≧1.
 33. A method according to claim 21 whereinthe deciphering function D(g) is the inverse function of a pseudo-randomvalue generating function.
 34. A method according to claim 21 whereinthe deciphering function D(g) is the identity function: m=D(g)=g.
 35. Amethod according to claim 21 wherein the input string B and the outputstring A are binary strings, the symbols s_(m) of the alphabet S beingbinary symbols comprising L bits, where L≧1.
 36. A method according toclaim 35 wherein the indexes h_(l) of the ordered succession H have abinary representation.
 37. A method according to claim 36 wherein theindexes h_(l) of the ordered succession H are equal to the correspondingsymbol S_(l) of the alphabet S: h_(l)=s_(l).
 38. A method according toclaim 36 wherein the indexes i of the items ƒ_(i) of the occurrencevector F as well as the indexes j of the items o_(j) of the orderedarrangement vector O have a binary representation.
 39. A methodaccording to claim 38 wherein the indexes i of the items ƒ_(i) of theoccurrence vector F as well as the indexes j of the items o_(j) of theordered arrangement vector O belong to the alphabet S.
 40. A methodaccording to claim 21 wherein the input string B is a string obtained asan output string of a method for encoding an input string A into anoutput string B, both the input string A and the output string Bcomprising N items, respectively, a_(n) and b_(n), where n=0, 1, . . . ,N−1, with items a_(n) and b_(n) belonging to an alphabet S of M symbolss_(m), where m=0, 1, . . . , M−1, the method for encoding comprising thesteps of: D. providing an ordered arrangement of the M symbols s_(m) ofthe alphabet S as represented by a corresponding ordered successionH={h_(l), where l=1, . . . , M−1} of the indexes m, such that h_(l)ε{0,1, . . . , M−1}h_(q)≠h_(r) for q≠r, in that a scanning operation iscarried out on items a_(n) of the input string A and in that, for eachof the items a_(k), where k ε{0, 1, . . . , N−1}, it includes thefollowing steps: E. arranging in decreasing order the M items ƒ_(i),where i=0, 1, . . . , M−1, of an occurrence vector F of the symbolss_(m) of the alphabet S in at least a portion W_(k)⊂A of T_(k) itemsa_(n) of the input string A, where T_(k)≧0, each item ƒ_(i) being equalto the number of occurrences in portion W_(k) of the correspondingsymbol s_(h) _(i) , in respect of which the following relationship isfulfilled: ${{\sum\limits_{i = 0}^{M - 1}f_{i}} = T_{k}},$

the items ƒ_(i) of the occurrence vector F being arranged in an orderedarrangement vector O comprising M items o_(j), where j=0, 1, . . . ,M−1, whose items o_(j) include the indexes i of items ƒ_(i) of vector Farranged in decreasing order, by employing, when two items ƒ_(i) areequal, the arrangement of the symbols s_(m) of the alphabet S, asrepresented by the corresponding ordered arrangement H, such that ƒ_(o)_(x) ≧ƒ_(o) _(y) , ∀y>x and for ƒ_(o) _(z) =ƒ_(o) _(z+1) , o _(z) =u<v=o_(z+1), where H={h₀, . . . , h_(u), . . . , h_(v), . . . , h_(M−1)} F.establishing a permutation vector P consisting of M items p_(t), wheret=0, 1, . . . , M−1, whose items are such as to fulfil the followingrelationship p _(o) _(j) =j for j=0, 1, . . . , M−1 and G. assigning toitem b_(k) of the output string B the symbol b _(k) =s _(E)(_(h) _(pt=w)) where w is the w-th index h_(w) of the ordered succession H such as tofulfil the relationship a_(k)=s_(h) _(w) and the enciphering functionE(m) is an invertible function whose dominion and co-dominion arecoinciding and are equal to the assembly {0, 1, . . . , M−1}:$\left\{ {\begin{matrix}{g = {{E(m)} \in \left\{ {0,1,\quad \ldots \quad,{M - 1}} \right\}}} \\{m = {{D(g)} = {{E^{- 1}(g)} \in \left\{ {0,1,\quad \ldots \quad,{M - 1}} \right\}}}}\end{matrix}.} \right.$


41. A method according to claim 40, characterised in that thedeciphering function D(g) is the inverse function of the encipheringfunction E(m) of the encoding method.
 42. A processor comprisingprocessing means for performing the following steps of encoding of inputstring A into an output string B, both the input string A and the outputstring B comprising N items, respectively, a_(n) and b_(n), where n=0,1, . . . , N−1, with items a_(n) and b_(n) belonging to an alphabet S ofM symbols s_(m), where m=0, 1, . . . , M−1, the processor performing thesteps of: A. providing an ordered arrangement of the M symbols s_(m) ofthe alphabet S as represented by a corresponding ordered successionH={h_(l), where l=1, . . . , M−1} of the indexes m, such that h_(l)ε{0,1, . . . , M−1}h_(q)≠h_(r) for q≠r, in that a scanning operation iscarried out on items a_(n) of the input string A and in that, for eachof the items a_(k), where k ε{0, 1, . . . , N−1}, it includes thefollowing steps: B. arranging in decreasing order the M items ƒ_(i),where i=0, 1, . . . , M−1, of an occurrence vector F of the symbolss_(m) of the alphabet S in at least a portion W_(k)⊂A of T_(k) itemsa_(n) of the input string A, where T_(k)≧0, each item ƒ_(i) being equalto the number of occurrences in portion W_(k) of the correspondingsymbol s_(h) _(i) , in respect of which the following relationship isfulfilled: ${{\sum\limits_{i = 0}^{M - 1}f_{i}} = T_{k}},$

the items ƒ_(i) of the occurrence vector F being arranged in an orderedarrangement vector O comprising M items o_(j), where j=0, 1, . . . ,M−1, whose items o_(j) include the indexes i of items ƒ_(i) of vector Farranged in decreasing order, by employing, when two items ƒ_(i) areequal, the arrangement of the symbols s_(m) of the alphabet S, asrepresented by the corresponding ordered arrangement H, such that ƒ_(o)_(x) ≧ƒ_(o) _(y) , ∀y>x and for ƒ_(o) _(z) =ƒ_(o) _(z+1) , o _(z) =u<v=o_(z+1), where H={h₀, . . . , h_(u), . . . , h_(v), . . . , h_(M−1}) C.establishing a permutation vector P consisting of M items p_(t), wheret=0, 1, . . . , M−1, whose items are such as to fulfil the followingrelationship p _(o) _(j) =j for j=0, 1, . . . , M−1 and D. assigning toitem b_(k) of the output string B the symbol b _(k) =s _(E)(_(h) _(pt=w)) where w is the w-th index h_(w) of the ordered succession H such as tofulfil the relationship a_(k)=s_(h) _(w) and the enciphering functionE(m) is an invertible function whose dominion and co-dominion arecoinciding and are equal to the assembly {0, 1, . . . , M−1}:$\left\{ {\begin{matrix}{g = {{E(m)} \in \left\{ {0,1,\quad \ldots \quad,{M - 1}} \right\}}} \\{m = {{D(g)} = {{E^{- 1}(g)} \in \left\{ {0,1,\quad \ldots \quad,{M - 1}} \right\}}}}\end{matrix}.} \right.$


43. A computer program operating on a computer, the program comprisingmeans for encoding an input string A into an output string B, both theinput string A and the output string B comprising N items, respectively,a_(n) and b_(n), where n=0, 1, . . . , N−1, with items a_(n) and b_(n)belonging to an alphabet S of M symbols s_(m), where m=0, 1, . . . ,M−1, the means comprising: means for providing an ordered arrangement ofthe M symbols s_(m) of the alphabet S as represented by a correspondingordered succession H={h_(l), where l=1, . . . , M−1} of the indexes m,such that h_(l) ε{0, 1, . . . , M−1}h_(q)≠h_(r) for q≠r, in that ascanning operation is carried out on items a_(n) of the input string Aand in that, for each of the items a_(k), where k ε{0, 1, . . . , N−1},it includes the following steps: arranging in decreasing order the Mitems ƒ_(i), where i=0, 1, . . . , M−1, of an occurrence vector F of thesymbols s_(m) of the alphabet S in at least a portion W_(k)⊂A of T_(k)items a_(n) of the input string A, where T_(k)≧0, each item ƒ_(i) beingequal to the number of occurrences in portion W_(k) of the correspondingsymbol s_(h) _(i) , in respect of which the following relationship isfulfilled: ${{\sum\limits_{i = 0}^{M - 1}f_{i}} = T_{k}},$

the items ƒ_(i) of the occurrence vector F being arranged in an orderedarrangement vector O comprising M items o_(j), where j=0, 1, . . . ,M−1, whose items o_(j) include the indexes i of items ƒ_(i) of vector Farranged in decreasing order, by employing, when two items ƒ_(i) areequal, the arrangement of the symbols s_(m) of the alphabet S, asrepresented by the corresponding ordered arrangement H, such that ƒ_(o)_(x) ≧ƒ_(o) _(y) , ∀y>x and for ƒ_(o) _(z) =ƒ_(o) _(z+1) , o _(z) =u<v=o_(z+1), where H={h₀, . . . , h_(u), . . . , h_(v), . . . , h_(M−1)}establishing a permutation vector P consisting of M items p_(t), wheret=0, 1, . . . , M−1, whose items are such as to fulfil the followingrelationship p _(o) _(j) =j for j=0, 1, . . . , M−1 and assigning toitem b_(k) of the output string B the symbol b _(k) =s _(E)(_(h) _(pt=w)) where w is the w-th index h_(w) of the ordered succession H such as tofulfil the relationship a_(k)=s_(h) _(w) and the enciphering functionE(m) is an invertible function whose dominion and co-dominion arecoinciding and are equal to the assembly {0, 1, . . . , M−1}:$\left\{ {\begin{matrix}{g = {{E(m)} \in \left\{ {0,1,\quad \ldots \quad,{M - 1}} \right\}}} \\{m = {{D(g)} = {{E^{- 1}(g)} \in \left\{ {0,1,\quad \ldots \quad,{M - 1}} \right\}}}}\end{matrix}.} \right.$


44. A memory medium readable by a computer having a program storedtherein, the medium comprising code implementing a method for encodingan input string A into an output string B, both the input string A andthe output string B comprising N items, respectively, a_(n) and b_(n),where n=0, 1, . . . , N−1, with items a_(n) and b_(n) belonging to analphabet S of M symbols s_(m), where m=0, 1, . . . , M−1, the mediumcomprising: code for instructing a processor to provide providing anordered arrangement of the M symbols s_(m) of the alphabet S asrepresented by a corresponding ordered succession H={h_(l), where l=1, .. . , M−1} of the indexes m, such that h_(l)ε{0, 1, . . . ,M−1}h_(q)≠h_(r) for q≠r, in that a scanning operation is carried out onitems a_(n) of the input string A and in that, for each of the itemsa_(k), where k ε{0, 1, . . . , N−1}, it includes the following steps:arranging in decreasing order the M items ƒ_(i), where i=0, 1, . . . ,M−1, of an occurrence vector F of the symbols s_(m) of the alphabet S inat least a portion W_(k)⊂A of T_(k) items a_(n) of the input string A,where T_(k)≧0, each item ƒ_(i) being equal to the number of occurrencesin portion W_(k) of the corresponding symbol s_(h) _(i) , in respect ofwhich the following relationship is fulfilled:${{\sum\limits_{i = 0}^{M - 1}f_{i}} = T_{k}},$

the items ƒ_(i) of the occurrence vector F being arranged in an orderedarrangement vector O comprising M items o_(j), where j=0, 1, . . . ,M−1, whose items o_(j) include the indexes i of items ƒ_(i) of vector Farranged in decreasing order, by employing, when two items ƒ_(i) areequal, the arrangement of the symbols s_(m) of the alphabet S, asrepresented by the corresponding ordered arrangement H, such that ƒ_(o)_(x) ≧ƒ_(o) _(y) , ∀y>x and for ƒ_(o) _(z) =ƒ_(o) _(z+1) , o _(z) =u<v=o_(z+1), where H={h₀, . . . , h_(u), . . . , h_(v), . . . , h_(M−1)}establishing a permutation vector P consisting of M items p_(t), wheret=0, 1, . . . , M−1, whose items are such as to fulfil the followingrelationship p _(o) _(j) =j for j=0, 1, . . . , M−1 and assigning toitem b_(k) of the output string B the symbol b _(k) =s _(E)(_(h) _(pt=w)) where w is the w-th index h_(w) of the ordered succession H such as tofulfil the relationship a_(k)=s_(h) _(w) and the enciphering functionE(m) is an invertible function whose dominion and co-dominion arecoinciding and are equal to the assembly {0, 1, . . . , M−1}:$\left\{ {\begin{matrix}{g = {{E(m)} \in \left\{ {0,1,\quad \ldots \quad,{M - 1}} \right\}}} \\{m = {{D(g)} = {{E^{- 1}(g)} \in \left\{ {0,1,\quad \ldots \quad,{M - 1}} \right\}}}}\end{matrix}.} \right.$


45. A processor comprising processing means for performing a method fordecoding an input string B into an output string A, both the inputstring B and the output string A comprising N items, respectively, b_(n)and a_(n), where n=0, 1, . . . , N−1, with items b_(n) and a_(n)belonging to an alphabet S of M symbols s_(m), where m=0, 1, . . . ,M−1, the processor comprising means for: A. providing an orderedarrangement of the M symbols s_(m) of alphabet S represented by acorresponding ordered succession H={h_(l), where l=0, 1, . . . , M−1} ofthe indexes m, such that h_(l)ε{0,1, . . . , M−1}h_(q)≠h_(r), for q≠r,in that a scanning operation of items b_(n) of the input string B iscarried out and in that, for each of the items b_(k), where k ε{0,1, . .. , N−1}, it includes the following steps: B. arranging in decreasingorder the M items ƒ_(i), where i=0, 1, . . . , M−1, of an occurrencevector F of the symbols s_(m) of the alphabet S in at least a portionW_(k)⊂A of T_(k) previously calculated items a_(n) of the output stringA, where T_(k)≧0, each item ƒ_(i) being equal to the number ofoccurrences in portion W_(k) of the corresponding symbol s_(h) _(i) , inrespect of which the following relationship is fulfilled:${{\sum\limits_{i = 0}^{M - 1}f_{i}} = T_{k}},$

the items ƒ_(i) of the occurrence vector F being arranged in an orderedarrangement vector O comprising M items o_(j), where j=0, 1, . . . ,M−1, whose items o_(j) include the indexes i of items ƒ_(i) of vector Farranged in decreasing order, by employing, when two items ƒ_(i) areequal, the ordered arrangement of the symbols s_(m) of the alphabet S,as represented by the corresponding ordered arrangement H, such thatƒ_(o) _(x) ≧ƒ_(o) _(y) , ∀y>x and for ƒ_(o) _(z) =ƒ_(o) _(z+1) , o _(z)=u<v=o _(z+1), where H={h₀, . . . , h_(u), . . . , h_(v), . . . ,h_(M−1)} and C. assigning to item a_(k) of the output string A thesymbol a _(k) =s _(D)(_(h) _(oj=w) ) where w is the w-th index h_(w) ofthe ordered succession H such as to fulfil the relationship b_(k)=s_(h)_(w) and the deciphering function D(g) is an invertible function whosedominion and co-dominion are coinciding and are equal to the assembly{0, 1, . . . , M−1}: $\left\{ {\begin{matrix}{m = {{D(g)} \in \left\{ {0,1,\quad \ldots \quad,{M - 1}} \right\}}} \\{g = {{E(m)} = {{D^{- 1}(m)} \in \left\{ {0,1,\quad \ldots \quad,{M - 1}} \right\}}}}\end{matrix}.} \right.$


46. A computer program operable on a computer that includes code meansto perform method for decoding an input string B into an output stringA, both the input string B and the output string A comprising N items,respectively, b_(n) and a_(n), where n=0, 1, . . . , N−1, with itemsb_(n) and a_(n) belonging to an alphabet S of M symbols s_(m), wherem=0, 1, . . . , M−1, the computer program comprising code means for: A.providing an ordered arrangement of the M symbols s_(m) of alphabet Srepresented by a corresponding ordered succession H={h_(l), where l=0,1, . . . , M−1} of the indexes m, such that h_(l)ε{0,1, . . . ,M−1}h_(q)≠h_(r), for q≠r, in that a scanning operation of items b_(n) ofthe input string B is carried out and in that, for each of the itemsb_(k), where k ε{0,1, . . . , N−1}, it includes the following steps: B.arranging in decreasing order the M items ƒ_(i), where i=0, 1, . . . ,M−1, of an occurrence vector F of the symbols s_(m) of the alphabet S inat least a portion W_(k)⊂A of T_(k) previously calculated items a_(n) ofthe output string A, where T_(k)≧0, each item ƒ_(i) being equal to thenumber of occurrences in portion W_(k) of the corresponding symbol s_(h)_(i) , in respect of which the following relationship is fulfilled:${{\sum\limits_{i = 0}^{M - 1}f_{i}} = T_{k}},$

the items ƒ_(i) of the occurrence vector F being arranged in an orderedarrangement vector O comprising M items o_(j), where j=0, 1, . . . ,M−1, whose items o_(j) include the indexes i of items ƒ_(i) of vector Farranged in decreasing order, by employing, when two items ƒ_(i) areequal, the ordered arrangement of the symbols s_(m) of the alphabet S,as represented by the corresponding ordered arrangement H, such thatƒ_(o) _(x) ≧ƒ_(o) _(y) , ∀y>x and for ƒ_(o) _(z) =ƒ_(o) _(z+1) , o _(z)=u<v=o _(z+1), where H={h₀, . . . , h_(u), . . . , h_(v), . . . ,h_(M−1)} and C. assigning to item a_(k) of the output string A thesymbol a _(k) =s _(D)(_(h) _(oj=w) ) where w is the w-th index h_(w) ofthe ordered succession H such as to fulfil the relationship b_(k)=s_(h)_(w) and the deciphering function D(g) is an invertible function whosedominion and co-dominion are coinciding and are equal to the assembly{0, 1, . . . , M−1}: $\left\{ {\begin{matrix}{m = {{D(g)} \in \left\{ {0,1,\quad \ldots \quad,{M - 1}} \right\}}} \\{g = {{E(m)} = {{D^{- 1}(m)} \in \left\{ {0,1,\quad \ldots \quad,{M - 1}} \right\}}}}\end{matrix}.} \right.$


47. A memory medium readable by a computer having a program storedtherein, the memory medium comprising code means for implementing amethod for decoding an input string B into an output string A, both theinput string B and the output string A comprising N items, respectively,b_(n) and a_(n), where n=0, 1, . . . , N−1, with items b_(n) and a_(n)belonging to an alphabet S of M symbols s_(m), where m=0, 1, . . . ,M−1, the memory medium comprising code means for: A. providing anordered arrangement of the M symbols s_(m) of alphabet S represented bya corresponding ordered succession H={h_(l), where l=0, 1, . . . , M−1}of the indexes m, such that h_(l)ε{0,1, . . . , M−1}h_(q)≠h_(r), forq≠r, in that a scanning operation of items b_(n) of the input string Bis carried out and in that, for each of the items b_(k), where k ε{0,1,. . . , N−1}, it includes the following steps: B. arranging indecreasing order the M items ƒ_(i), where i=0, 1, . . . , M−1, of anoccurrence vector F of the symbols s_(m) of the alphabet S in at least aportion W_(k)⊂A of T_(k) previously calculated items a_(n) of the outputstring A, where T_(k)≧0, each item ƒ_(i) being equal to the number ofoccurrences in portion W_(k) of the corresponding symbol s_(h) _(i) , inrespect of which the following relationship is fulfilled:${{\sum\limits_{i = 0}^{M - 1}\quad f_{i}} = T_{k}},$

the items ƒ_(i) of the occurrence vector F being arranged in an orderedarrangement vector O comprising M items o_(j), where j=0, 1, . . . ,M−1, whose items o_(j) include the indexes i of items ƒ_(i) of vector Farranged in decreasing order, by employing, when two items ƒ_(i) areequal, the ordered arrangement of the symbols s_(m) of the alphabet S,as represented by the corresponding ordered arrangement H, such thatƒ_(o) _(x) ≧ƒ_(o) _(y) , ∀y>x and for ƒ_(o) _(z) =ƒ_(o) _(z+1) , o _(z)=u<v=o _(z+1), where H={h₀, . . . , h_(u), . . . , h_(v), . . .,h_(M−1)} and C. assigning to item a_(k) of the output string A thesymbol a _(k) =s _(D)(_(h) _(oj=w) ) where w is the w-th index h_(w) ofthe ordered succession H such as to fulfil the relationship b_(k)=s_(h)_(w) and the deciphering function D(g) is an invertible function whosedominion and co-dominion are coinciding and are equal to the assembly{0, 1, . . . , M−1}: $\left\{ {\begin{matrix}{m = {{D(g)} \in \left\{ {0,1,\ldots \quad,{M - 1}} \right\}}} \\{g = {{E(m)} = {{D^{- 1}(m)} = {\in \left\{ {0,1,\ldots \quad,{M - 1}} \right\}}}}}\end{matrix}.} \right.$